/*-----------------------------------------------------------------------------
 * CommonHeaders.h
 *-----------------------------------------------------------------------------
 * 
 *-----------------------------------------------------------------------------
 * All rights reserved by somma (fixbrain@gmail.com, unsorted@msn.com)
 *-----------------------------------------------------------------------------
 * - 10.11.2010 created
**---------------------------------------------------------------------------*/

#ifndef _common_headers_h_
#define _common_headers_h_

#ifdef __cplusplus
extern "C" {
#endif 

#include <ntifs.h>
#include <ntstrsafe.h>
#include <ntintsafe.h>

#ifdef __cplusplus
}
#endif 

#include "ShareHeader.h"
#include "DriverDebug.h"

typedef struct _WDG_SELF_PROTECTION
{
    BOOLEAN     Enabled;
    UINT32      PidToProtect;
    PVOID       OriginalNtOpenProcess;
    PVOID       OriginalNtCreateFile;
} WDG_SELF_PROTECTION, *PWDG_SELF_PROTECTION;

// DEVICE_EXTENSION 
//
typedef struct _DEVICE_EXTENSION 
{
	BOOLEAN         Initialized;	
	PDEVICE_OBJECT	DeviceObject;// device object this extension belongs to	
	DWORD			OsVersion;
	DWORD			NumberOfProcessor;

    // Self protection stuff
    // 
    WDG_SELF_PROTECTION     WDGSelfProtectionContext;

} DEVICE_EXTENSION, *PDEVICE_EXTENSION;

extern PDEVICE_EXTENSION		g_dev_ext;

#endif//_common_headers_h_